/**
 * 组件名：Loading
 * 作用：加载中组件的显示与控制
 * props：tip-加载文案的显示  spinning-控制加载组件是否显示，默认true
 */
import React, { Component } from 'react';
import { Spin } from 'antd'

class Loading extends Component {
    //默认值
    static defaultProps = {
        tip: '疯狂加载中...',
        spinning: true   //控制加载块的显示与隐藏
    }
    render() {
        return (
            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%' }}>
                <Spin size="large" tip={this.props.tip} spinning={this.props.spinning} />
            </div>
        );
    }
}

export default Loading;
